package com.homer.iot.esptouch.model;

import com.homer.iot.esptouch.tcp.UartTCPUtil;

public class Infrared extends Slaver{
	public Infrared(String id, String type) {
		super(id, type);		
	}
	
	public  boolean getInfraredStatus(){
		Byte ret = UartTCPUtil.getInfraredStatus(device.getDeviceIP());
		
		if (null != ret) {
			//0：无人；1：有人
			if (ret == 1) {
				return true ;
			} else {
				return false;
			}
		}

		else
			return false;
	}
}
